﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Content.Web;
using System.Collections.Generic;
using System.Linq;
using Content.Converters;
using System.Windows.Media.Imaging;
using System.Windows.Markup;
using System.Xml.Linq;
using System.IO;
using System.Xml.XPath;
using System.Xml;
using System.Text;
using System.Diagnostics;
using System.Text.RegularExpressions;

namespace Content
{
	public partial class DbUnitContentRows : DbUnit
	{
        public DbUnitContentRows()
        {
        }

        public DbUnitContentRows(Unit unit) : base(unit)
        {
            this.unit = unit;

            InitializeComponent();
        }

        protected override ObjectAnimationUsingKeyFrames DetailsTextAnimation
        {
            get 
            {
                throw new NotImplementedException(); 
            }
        }

        protected override DoubleAnimationUsingKeyFrames DetailsOpacityAnimation
        {
            get 
            {
                throw new NotImplementedException(); 
            }
        }

        protected override int BulletsColumn
        {
            get 
            { 
                throw new NotImplementedException(); 
            }
        }

        protected override Storyboard Storyboard
        {
            get
            {
                return this.storyboard;
            }
        }

        protected override Grid GridLayout
        {
            get
            {
                return this.LayoutRoot;
            }
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            var darkColors = this.GetDarkColors().AsQueryable();
            var foreground = darkColors.GetRandom();
            var brush = new SolidColorBrush(foreground);

            this.Title.Text = unit.UnitText;
            this.Title.Foreground = brush;

            LoadContentRows(foreground);

            this.storyboard.Begin();
        }
    }
}